package com.paw.hys.sb.controller;

import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.core.util.RandomUtil;
import com.paw.hys.sb.client.ServiceHcClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lvzihai
 * @date 2022/8/25
 **/
@RestController
public class ServiceHbController {

  @Autowired
  private ServiceHcClient serviceHcClient;

  @GetMapping("/welcomeHa")
  public String welcomeHb(){
    ThreadUtil.sleep(RandomUtil.randomInt(2000));
    return "serviceHb";
  }



  @GetMapping("/callHc")
  public String callHc(){
//    ThreadUtil.sleep(RandomUtil.randomInt(2000));
//    String result = serviceHcClient.welcomeHc();
    ThreadUtil.sleep(3000);
    return "in hb callHc result hb";
  }


}
